package com.gitee.hioove;


import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class d {
    public static void main(String[] args) throws IOException {
        String a = "ASDFGHJKL";
        try (BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(new File("xxxxxxxxxxx.txt"), true))) {
            bos.write(a.getBytes(StandardCharsets.UTF_8));
        }
        byte[] str = new byte[1];
        List<String> result = new ArrayList<>();
        try (BufferedInputStream bis = new BufferedInputStream(new FileInputStream(new File("xxxxxxxxxxx.txt")))) {
            while (bis.read(str) != -1) {
                result.add(new String(str, StandardCharsets.UTF_8));
            }
        }
        System.out.println(result);
//    BufferedInputStream bis = new BufferedInputStream(new FilterInputStream( ))
//            bis.read(a.getBytes(StandardCharsets.UTF_8));
//            bis.close();


        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String s = scanner.nextLine();
            if (s.length() <= 8) {
                System.out.println(s + a.substring(s.length()));
            } else {
                String ss = s;
                while (ss.length() != 0) {
                    if (ss.length() <= 8) {
                        System.out.println(ss + a.substring(ss.length()));
                        break;
                    } else {
                        System.out.println(ss.substring(0, 8));
                    }
                    ss = ss.substring(8);
                }
            }
        }
    }
//        while ((str = bf.readLine()) != null) {
//            if (str.length() <= 8) {
//                System.out.println(str + IntStream.rangeClosed(1, 8 - str.length()).mapToObj(operand -> "0").collect(Collectors.joining()));
//            }
//            if (str.length() > 8) {
//                for (int i = 0; i < str.length(); ) {
//                    if (i + 8 > str.length()) {
//                        String substring = str.substring(i, str.length());
//                        System.out.println(substring + IntStream.rangeClosed(1, 8 - substring.length()).mapToObj(operand -> "0").collect(Collectors.joining()));
//                        break;
//                    } else {
//                        System.out.println(str.substring(i, i + 8));
//                    }
//                    i = i + 8;
//                }
//            }
//        }
}
